import {
    ArcRotateCamera, Engine, MeshBuilder, Scene, Vector3,
    StandardMaterial, Color3, HemisphericLight, ParticleSystem,
    Texture, CubeTexture, Animation, SpriteManager, Vector4, Sprite, Plane, SpriteMap, SpritePackedManager,
    FreeCamera, PointLight, Vector2
} from '@babylonjs/core'

// const m = require('@/assets/img')

// 登录的场景
const createScene2 = (canvas) => {
    // 渲染引擎
    const engine = new Engine(canvas)
    // 场景
    const scene = new Scene(engine)

    // 相机
    const camera = new ArcRotateCamera('', -Math.PI / 2, Math.PI / 2, 2, new Vector3(0, 0, -0.3), scene)

    camera.attachControl(canvas, scene)

    // 灯光
    const light = new HemisphericLight('', new Vector3(0, 5, 0), scene)

    // 大盒子
    const boxBlue = MeshBuilder.CreateBox('box-yellow', { size: 1 }, scene)

    // 物体材料差不多就是物体的样式
    const materialYellow = new StandardMaterial('box-blue-material', scene)

    materialYellow.diffuseTexture = new Texture('https://t14.baidu.com/it/u=4066373625,157943264&fm=30&app=106&size=f242,150&n=0&f=JPEG&fmt=auto?s=016020AADA3F9BEF4C90EF990300D08F&sec=1661360400&t=cfc9bc4ee998f20f3e04fc2a472146d1', scene)

    materialYellow.aff
    // materialYellow.diffuseColor = Color3.Yellow()
    materialYellow.alpha = 1
    // materialYellow.diffuseTexture = new Texture('../../assets/0.png', scene)
    boxBlue.material = materialYellow

    // 小盒子
    const boxGreen = MeshBuilder.CreateBox('box-green', { size: 0.4 }, scene)
    const materialGreen = new StandardMaterial('', scene)
    materialGreen.diffuseColor = Color3.Green()
    boxGreen.material = materialGreen

    // 大盒子动画
    const animation = new Animation('yellow', 'rotation', 5, Animation.ANIMATIONTYPE_VECTOR3, Animation.ANIMATIONLOOPMODE_CYCLE)
    const arr = [
        { frame: 0, value: new Vector3(0, 0, 0) },
        { frame: 5, value: new Vector3(3, 3, 0) },
        { frame: 10, value: new Vector3(5, 5, 0) },
        { frame: 15, value: new Vector3(3, 3, 0) },
        { frame: 20, value: new Vector3(0, 0, 0) }
    ]
    animation.setKeys(arr)
    boxBlue.animations.push(animation)
    scene.beginAnimation(boxBlue, 0, 20, true)


    // 小盒子动画
    const animation1 = new Animation('Green', 'rotation', 5, Animation.ANIMATIONTYPE_VECTOR3, Animation.ANIMATIONLOOPMODE_CYCLE)
    const arr1 = [
        { frame: 0, value: new Vector3(0, 0, 0) },
        { frame: 5, value: new Vector3(-3, -3, 0) },
        { frame: 10, value: new Vector3(-5, -5, 0) },
        { frame: 15, value: new Vector3(-3, -3, 0) },
        { frame: 20, value: new Vector3(0, 0, 0) }
    ]
    animation1.setKeys(arr1)
    boxGreen.animations.push(animation1)
    scene.beginAnimation(boxGreen, 0, 20, true)

    engine.runRenderLoop(() => {
        scene.render()
        // boxBlue.rotation.x += 0.01
        // boxBlue.rotation.y += 0.01
        // boxGreen.rotation.x += 0.03
        // boxGreen.rotation.y += 0.03
        // if (callback) {
        //     callback(engine.getFps().toFixed())
        // }
    })
    window.addEventListener('resize', () => {
        engine.resize()
    })
}


// 注册页面的场景
const createScene3 = (canvas) => {
    // 创建引擎
    const engine = new Engine(canvas)

    // 场景
    const scene = new Scene(engine)

    // 相机
    const camera = new ArcRotateCamera('', -Math.PI / 2, Math.PI / 2.5, 15, new Vector3(0, 1, 0), scene)
    camera.upperBetaLimit = Math.PI / 2;
    camera.attachControl(canvas, true)
    // 灯光
    const light = new HemisphericLight('', new Vector3(2, 3, 0), scene)

    // 美女图片
    const spriteManager = new SpriteManager('', 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg2.3png.com%2Feb6a019e989f21b1a2e47b5a406713ac2469.png&refer=http%3A%2F%2Fimg2.3png.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1663843557&t=da015be34fa3dc747009cc6214195156', 2000, { width: 500, height: 500 }, scene)
    for (let i = 0; i < 15; i++) {
        const sprit = new Sprite('play', spriteManager)
        sprit.position.x = Math.random() * 20
        sprit.position.z = Math.random() * 30
        sprit.position.y = 0.5
    }

    // 小人的精灵图
    const man = new SpriteManager('', require('@/assets/man.png'), 1, { width: 64, height: 64 }, scene)
    const man1 = new Sprite('', man)
    // 开启点击
    man1.isPickable = true
    // 使用alpha来完成点击
    man1.useAlphaForPicking = true
    man.isPickable = true
    // 从第几张图开始
    man1.cellIndex = 0
    man1.playAnimation(0, 43, true, 50)
    man1.position.x = 5
    man1.position.y = 0.5

    // 场景点击事件
    scene.onPointerDown = function (e) {
        // console.log(scene);
        // 获取你点击的对象属性
        const pickResult = scene.pickSprite(this.pointerX, this.pointerY)
        // console.log(pickResult);
        if (pickResult.hit) {
            pickResult.pickedSprite.angle += 0.5
        }
    };

    // 使用压缩精灵表管理
    var spm = new SpritePackedManager("spm", "https://minio.cnbabylon.com/babylon/p15/pack1.png", 3, scene);
    var sprite1 = new Sprite("player", spm);
    sprite1.playAnimation(0, 3, true, 2000);
    sprite1.position.y = 0.5;
    sprite1.position.x = -5
    sprite1.size = 1;
    sprite1.invertU = 0;




    // 屋顶
    const roof = MeshBuilder.CreateCylinder("roof", { diameter: 2, height: 1.2, tessellation: 3 });
    roof.scaling.x = .75;
    roof.rotation.z = Math.PI / 2;
    roof.position.y = 1.22;

    // 屋子的下半部
    const roof1 = MeshBuilder.CreateBox("", {});
    roof1.position.y = 0.5


    // 地板
    const plane = MeshBuilder.CreateGround('', { width: 100, height: 100 }, scene)
    // 天空物体盒子
    const box = MeshBuilder.CreateBox('', { size: 200 }, scene)
    const boxmaterial = new StandardMaterial('', scene)
    boxmaterial.diffuseTexture = new Texture(require('@/assets/img/skybox_nx.jpg'), scene)
    boxmaterial.backFaceCulling = false
    box.material = boxmaterial

    // 物体材料差不多就是物体的样式
    const Planematerial = new StandardMaterial('', scene)
    Planematerial.diffuseTexture = new Texture(require('@/assets/0.jpg'), scene)
    plane.material = Planematerial

    const state = 10
    // 创建动画
    // const animation = new Animation('', 'position', state, Animation.ANIMATIONTYPE_VECTOR3, Animation.ANIMATIONLOOPMODE_CYCLE)

    // // 创建帧数组
    // const arr = [
    //     { frame: 0, value: new Vector3(1, .5, 0) },
    //     { frame: state, value: new Vector3(-1, 1, 0) },
    //     { frame: 2 * state, value: new Vector3(1, .5, 0) },
    // ]
    // // 往对象里设置值
    // animation.setKeys(arr)
    // // 将动画添加到物体动画中
    // box.animations.push(animation)
    // // 开始动画
    // scene.beginAnimation(box, 0, 2 * state, true)

    window.addEventListener('resize', () => {
        engine.resize()
    })
    engine.runRenderLoop(() => {
        scene.render()
    })

}



// spriteMap
const createScene4 = (canvas) => {
    const engine = new Engine(canvas)
    const scene = new Scene(engine)
    var light = new PointLight("Point", new Vector3(5, 10, 5), scene);
    var camera = new FreeCamera("Camera", new Vector3(0, 0, -30), scene);
    // Attach the Controls to the canvas
    camera.attachControl(canvas, true);

    const alterJson = getJSONFile()
    const spriteSheet = new Texture('https://minio.cnbabylon.com/babylon/Legends_Level_A.png', scene, false, false, null,
        null,
        null,
        false)

    const backgroundSize1 = new Vector2(200, 60)

    const background1 = new SpriteMap('', alterJson, spriteSheet, {
        stageSize: backgroundSize1,
        flipU: true,
        maxAnimationFrames: 8,
        baseTile: 42,
        layerCount: 2,
        colorMultiply: new Vector3(0.3, 0.3, 0.3)
    }, scene)

    const eighth = 1 / 8
    const speed = 0.005

    background1.addAnimationToTile(1, 0, 2, eighth * 1, speed)
    background1.addAnimationToTile(1, 1, 3, eighth * 2, speed)
    background1.addAnimationToTile(1, 2, 4, eighth * 3, speed)
    background1.addAnimationToTile(1, 3, 5, eighth * 4, speed)
    background1.addAnimationToTile(1, 4, 6, eighth * 5, speed)
    background1.addAnimationToTile(1, 5, 7, eighth * 6, speed)
    background1.addAnimationToTile(1, 6, 8, eighth * 7, speed)
    background1.addAnimationToTile(1, 7, 1, 1, speed)


    background1.addAnimationToTile(25, 0, 26, eighth * 1, speed)
    background1.addAnimationToTile(25, 1, 27, eighth * 2, speed)
    background1.addAnimationToTile(25, 2, 28, eighth * 3, speed)
    background1.addAnimationToTile(25, 3, 29, eighth * 4, speed)
    background1.addAnimationToTile(25, 4, 30, eighth * 5, speed)
    background1.addAnimationToTile(25, 5, 31, eighth * 6, speed)
    background1.addAnimationToTile(25, 6, 29, eighth * 7, speed)
    background1.addAnimationToTile(25, 7, 25, 1, speed)

    background1.addAnimationToTile(48, 0, 49, 0.25, speed)
    background1.addAnimationToTile(48, 1, 50, 0.5, speed)
    background1.addAnimationToTile(48, 2, 51, 0.75, speed)
    background1.addAnimationToTile(48, 4, 48, 1, speed)

    background1.addAnimationToTile(49, 0, 50, 0.25, speed * 0.5)
    background1.addAnimationToTile(49, 1, 51, 0.5, speed * 0.5)
    background1.addAnimationToTile(49, 2, 48, 0.75, speed * 0.5)
    background1.addAnimationToTile(49, 4, 49, 1, speed * 0.5)

    background1.addAnimationToTile(50, 0, 51, 0.25, speed * 0.3)
    background1.addAnimationToTile(50, 1, 48, 0.5, speed * 0.3)
    background1.addAnimationToTile(50, 2, 49, 0.75, speed * 0.3)
    background1.addAnimationToTile(50, 4, 50, 1, speed * 0.3)
    // console.log(background1);
    background1.position.z = 5

    // 替换左上部分的贴图
    for (var i = 0; i < background1.spriteCount; i++) {
        background1.changeTiles(0, new Vector2(i + 1, backgroundSize1.y - 1), i)
    }


    // 后面黑墙上的水流
    for (let x = 15; x < backgroundSize1.x - 15; x++) {
        for (let y = backgroundSize1.y - 26; y > 0; y--) {
            if (x % 12 == 0) {
                background1.changeTiles(1, new Vector2(x, y), 1)
            }
        }
    }

    // 换上下水道贴图
    for (let x = 15; x < backgroundSize1.x - 15; x++) {
        if (x % 12 == 0) {
            background1.changeTiles(1, new Vector2(x, backgroundSize1.y - 26), 25)
        }
    }

    // 另一条水
    for (let x = 15; x < backgroundSize1.x - 15; x++) {
        for (let y = backgroundSize1.y - 12; y > 0; y--) {
            if ((x + 6) % 12 == 0) {
                background1.changeTiles(1, new Vector2(x, y), 1);
            }
        }
    }


    // 第二块墙
    let backgroundSize2 = new Vector2(80, 40);
    let background2 = new SpriteMap('base', alterJson, spriteSheet,
        {
            stageSize: backgroundSize2,
            maxAnimationFrames: 8,
            baseTile: 42,
            layerCount: 2,
            flipU: true,
            colorMultiply: new Vector3(0.6, 0.6, 0.6)
        },
        scene);
    for (let x = 15; x < backgroundSize2.x - 15; x++) {
        for (let y = backgroundSize2.y - 15; y > 15; y--) {
            background2.changeTiles(0, new Vector2(x, y), 0)
        }
    }

    // 第三面墙
    let backgroundSize3 = new Vector2(80, 40);

    let background3 = new SpriteMap('base', alterJson, spriteSheet,
        {
            stageSize: backgroundSize3,
            maxAnimationFrames: 8,
            baseTile: 42,
            layerCount: 2,
            flipU: true,
            colorMultiply: new Vector3(1, 1, 0.6)
        },
        scene);
    background3.position.z = -5

    // 空白替换
    for (let x = 15; x < backgroundSize3.x - 15; x++) {
        for (let y = backgroundSize3.y - 15; y > 15; y--) {
            background3.changeTiles(0, new Vector2(x, y), 0)
        }
    }

    // 下水道图形
    for (let x = 20; x < backgroundSize3.x - 10; x++) {
        if (x % 12 == 0) {
            background3.changeTiles(1, new Vector2(x, backgroundSize3.y - 14), 25)
        }
    }
    for (let y = backgroundSize3.y - 15; y > 15; y--) {
        for (let x = 20; x < backgroundSize3.x - 10; x++) {
            if (x % 12 == 0) {
                background3.changeTiles(1, new Vector2(x, y), 1)
            }
        }
    }

    // 人物
    const man = new SpriteManager('', require('@/assets/man.png'), 1, { width: 64, height: 64 }, scene)
    const man1 = new Sprite('', man)
    man1.playAnimation(0, 43, true, 50)
    man1.position.z = -5
    man1.position.y = -3.5


    // 马儿
    const house = new SpriteManager('', require('@/assets/horse_frames.jpg'), 1, { width: 67, height: 32 }, scene)
    const horse = new Sprite('', house)
    horse.cellIndex = 0
    horse.playAnimation(0, 10, true, 50)
    horse.position.z = -5
    horse.position.x = -5
    horse.position.y = -3.5

    background3.animationMap = background1.animationMap
    window.addEventListener('resize', () => {
        engine.resize()
    })
    engine.runRenderLoop(() => {
        scene.render()
    })

}

// Json数据
const getJSONFile = () => {
    return {
        "frames": [
            {
                "filename": "blank.png",
                "frame": { "x": 221, "y": 221, "w": 1, "h": 1 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Falling-Water-0.png",
                "frame": { "x": 1, "y": 1, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Falling-Water-1.png",
                "frame": { "x": 1, "y": 36, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Falling-Water-2.png",
                "frame": { "x": 1, "y": 71, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Falling-Water-3.png",
                "frame": { "x": 1, "y": 106, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Falling-Water-4.png",
                "frame": { "x": 1, "y": 141, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Falling-Water-5.png",
                "frame": { "x": 1, "y": 176, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Falling-Water-6.png",
                "frame": { "x": 1, "y": 211, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Falling-Water-7.png",
                "frame": { "x": 1, "y": 246, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Large-Column-Light-0.png",
                "frame": { "x": 36, "y": 1, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Large-Column-Light-1.png",
                "frame": { "x": 71, "y": 1, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Large-Column-Light-2.png",
                "frame": { "x": 106, "y": 1, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Large-Column-Light-3.png",
                "frame": { "x": 141, "y": 1, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Large_Column-0.png",
                "frame": { "x": 176, "y": 1, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Large_Column-1.png",
                "frame": { "x": 211, "y": 1, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Large_Column-2.png",
                "frame": { "x": 246, "y": 1, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Large_Column-3.png",
                "frame": { "x": 36, "y": 36, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Roman-Column-0.png",
                "frame": { "x": 36, "y": 71, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Roman-Column-1.png",
                "frame": { "x": 36, "y": 106, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Roman-Column-2.png",
                "frame": { "x": 36, "y": 141, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Roman-Column-3.png",
                "frame": { "x": 36, "y": 176, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Roman_Column_Light-0.png",
                "frame": { "x": 36, "y": 211, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Roman_Column_Light-1.png",
                "frame": { "x": 36, "y": 246, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Roman_Column_Light-2.png",
                "frame": { "x": 71, "y": 36, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Roman_Column_Light-3.png",
                "frame": { "x": 106, "y": 36, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Sewer-Drain-0.png",
                "frame": { "x": 141, "y": 36, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Sewer-Drain-1.png",
                "frame": { "x": 176, "y": 36, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Sewer-Drain-2.png",
                "frame": { "x": 211, "y": 36, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Sewer-Drain-3.png",
                "frame": { "x": 246, "y": 36, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Sewer-Drain-4.png",
                "frame": { "x": 71, "y": 71, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Sewer-Drain-5.png",
                "frame": { "x": 71, "y": 106, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Sewer-Drain-6.png",
                "frame": { "x": 71, "y": 141, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Sewer-Drain-7.png",
                "frame": { "x": 71, "y": 176, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Stone-Platform-0.png",
                "frame": { "x": 71, "y": 211, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Stone-Platform-1.png",
                "frame": { "x": 71, "y": 246, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Stone-Platform-2.png",
                "frame": { "x": 106, "y": 106, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Stone-Platform-3.png",
                "frame": { "x": 106, "y": 141, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Stone-Platform-4.png",
                "frame": { "x": 106, "y": 176, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Stone-Platform-5.png",
                "frame": { "x": 106, "y": 211, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Stone-Platform-6.png",
                "frame": { "x": 106, "y": 246, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Stone-Platform-7.png",
                "frame": { "x": 141, "y": 106, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Stone-Platform-8.png",
                "frame": { "x": 176, "y": 106, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Stone-Platform-9.png",
                "frame": { "x": 211, "y": 106, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Stone-Platform-10.png",
                "frame": { "x": 106, "y": 71, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Stone-Platform-11.png",
                "frame": { "x": 141, "y": 71, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Stone-Platform-12.png",
                "frame": { "x": 176, "y": 71, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Stone-Platform-13.png",
                "frame": { "x": 211, "y": 71, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Stone-Platform-14.png",
                "frame": { "x": 246, "y": 71, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Torch-A-0.png",
                "frame": { "x": 246, "y": 106, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Torch-A-1.png",
                "frame": { "x": 141, "y": 141, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Torch-A-2.png",
                "frame": { "x": 141, "y": 176, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            },
            {
                "filename": "Torch-A-3.png",
                "frame": { "x": 141, "y": 211, "w": 32, "h": 32 },
                "rotated": false,
                "trimmed": false,
                "spriteSourceSize": { "x": 0, "y": 0, "w": 32, "h": 32 },
                "sourceSize": { "w": 32, "h": 32 }
            }],
        "meta": {
            "app": "https://www.codeandweb.com/texturepacker",
            "version": "1.0",
            "image": "Legends_Level_A.png",
            "format": "RGBA8888",
            "size": { "w": 279, "h": 279 },
            "scale": "1",
            "smartupdate": "$TexturePacker:SmartUpdate:a755ec93daaec56d1c8bcd801e167677:2e759c84cbaf9134b80c1a34b50e5c9c:9f820b9412efc8199e0407f80b8c0011$"
        }
    }
}

export { createScene2, createScene3, createScene4 }
